# Copyright (c) 2011-2012 Tomi Paanan

QT += core \
      gui \
      declarative

TEMPLATE = app
TARGET = quickgestures
VERSION = 0.2.0
MOC_DIR = ./moc

DEFINES += QG_NO_LIBRARY

CONFIG(debug, debug|release) {
    # Enable debug printing if not pure release build.
    message(qgui.pro: Debug printing enabled.)
    DEFINES += QG_DEBUG
}

INCLUDEPATH += ./inc

HEADERS += \
    inc/gesturehelper.h \
    inc/gesturevisualizer.h \
    inc/qguiconstants.h

SOURCES += \
    src/main.cpp \
    src/gesturehelper.cpp \
    src/gesturevisualizer.cpp

OTHER_FILES += \
    qml/common/*.qml \
    qml/common/*.js

RESOURCES += rsc/common.qrc

include(../qgengine/qgengine.pri)

symbian {
    message(Symbian build)
    #CONFIG += mobility
    #MOBILITY += feedback

    TARGET = QuickGestures
    TARGET.UID3 = 0xE60948C2
    TARGET.EPOCHEAPSIZE = 0x20000 \
                          0x2000000
    TARGET.CAPABILITY = ReadUserData \
                        WriteUserData \
                        UserEnvironment

    # Smart Installer package's UID
    # This UID is from the protected range and therefore the package will
    # fail to install if self-signed. By default qmake uses the unprotected
    # range value if unprotected UID is defined for the application and
    # 0x2002CCCF value if protected UID is given to the application
    #symbian:DEPLOYMENT.installer_header = 0x2002CCCF

    SYMBIANBUILD_DEPENDENCYOFF = 1
    #INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
    #LIBS += lquickgesturesengine

    RESOURCES += rsc/symbian.qrc
    ICON = icons/quickgestures.svg
}

unix:!symbian {
    maemo5 {
        error(Maemo5 build not supported!)
    }
    else {
        contains(DEFINES, DESKTOP) {
            error(Unix desktop build not supported!)
        }
        else {
            message(Harmattan build)
            DEFINES += Q_WS_MAEMO_6
            target.path = /opt/quickgestures/bin

            LIBS += -L$${DESTDIR} -lquickgesturesengine

            RESOURCES += rsc/harmattan.qrc

            OTHER_FILES += \
                qml/harmattan/main.qml \
                qml/harmattan/HarmattanUIConstants.js \
                qml/harmattan/BusyLabel.qml \
                qml/harmattan/EditorPage.qml \
                qml/harmattan/FileManagementPage.qml \
                qml/harmattan/FolderListControl.qml \
                qml/harmattan/GestureList.qml \
                qml/harmattan/GestureListPage.qml \
                qml/harmattan/ProgressLabel.qml \
                qml/harmattan/RecognitionPage.qml

            desktopfile.files = qtc_packaging/debian_harmattan/$${TARGET}.desktop
            desktopfile.path = /usr/share/applications
            icon.files = icons/quickgestures.png
            icon.path = /usr/share/icons/hicolor/64x64/apps

            INSTALLS += desktopfile \
                        icon
        }
    }

    INSTALLS += target
}

simulator {
    message(Simulator build)
    DESTDIR = ../bin
    RESOURCES += rsc/symbian.qrc

    OTHER_FILES += \
        qml/symbian/*.qml \
        qml/symbian/*.js
}

# End of file.
